<?php
/**
 * 装修公司
 */
namespace App\Http\ControllersAdmin;

use App\Service\ScrapyEffService;
use App\Validation\ListValidation;

class ScrapyEffController extends BaseController
{
	/**
	 * [indexAction 列表]
	 * @return [type] [description]
	 */
	public function indexAction()
	{
		$this->getUser();
		$raw = $this->validation(new ListValidation, $this->request->getJsonRawBody());

		$data = ScrapyEffService::getList($raw);

		$count = ScrapyEffService::count();

		$assign = [
			'total' => $count,
			'list'  => $data
		];
		return $this->echoJson($assign);
	}
}